<template>
  <div class="site-aside-container">
    <template v-if="data">
      <Avatar :url="data.avatar" />
      <h1 class="title">{{ data.siteTitle }}</h1>
      <Menu />
      <Contact />
      <p class="footer">
        {{ data.icp }}
      </p>
    </template>
  </div>
</template>

<script>
import { mapState } from 'vuex'
import Avatar from '@/components/Avatar'
import Menu from '@/components/SiteAside/Menu'
import Contact from '@/components/SiteAside/Contact'

export default {
  name: 'SiteAside',
  components: { Avatar, Menu, Contact },
  computed: {
    ...mapState('setting', ['data', 'loading']),
  },
}
</script>

<style scoped lang="less">
@import '~@/styles/var.less';
.site-aside-container {
  width: 100%;
  height: 100%;
  background-color: @dark;
  padding: 20px 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  .avatar-container {
    margin: 0 auto;
  }
  .title {
    font-size: 1.2em;
    color: #fff;
    text-align: center;
  }
  .footer {
    text-align: center;
    font-size: 12px;
  }
}
</style>
